package com.tongji.diy.view.material
{
	import com.tongji.diy.view.filter.DefaultFilter;
	import com.tongji.diy.view.filter.WhiteFilter;
	
	import flare.core.Texture3D;
	import flare.materials.Material3D;
	import flare.materials.Shader3D;
	import flare.materials.filters.TextureFilter;
	
	import flash.display.BitmapData;
	import flash.display.BlendMode;
	import flash.filters.GlowFilter;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	/**
	 * 
	 * @author Sun
	 * 
	 */
	
	public class WhiteMaterial
	{
		static private var defMat:Material3D;
		static private var count:uint = 0;
		
		public function WhiteMaterial()
		{
			trace("Should Get DefalutMaterial by static function getInst()")
		}
		
		static public function getInst():Material3D
		{
			if(count)
				return defMat;
			
			var filter:TextureFilter = WhiteFilter.getInst();
			var shader:Shader3D = new Shader3D("");
			shader.filters.push(filter);
			defMat = shader as Material3D;
			
			return defMat;
		}
	}
}